import request from '@/utils/request'
import axios from "axios";
import {getToken} from "@/utils/auth";

export function initiate(formData) {
  return request({
    url: '/shareDive/upload/initiate',
    method: 'post',
    data: formData
  })
}

export function chunk(formData) {
  return request({
    url: '/shareDive/upload/chunk',
    method: 'post',
    data: formData,
    headers: {
      repeatSubmit: false
    }
  })
}

export function complete(fileId) {
  return request({
    url: '/shareDive/upload/complete/' + fileId,
    method: 'post'
  })
}
